﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JsonEditor.Common
{
    public class CProperty
    {

        private string m_Name = string.Empty;

        private bool m_bReadOnly = false;

        private bool m_bVisible = true;

        private object m_Value = null;

        private string m_Category = string.Empty;

        TypeConverter m_Converter = null;

        object m_Editor = null;





        public CProperty(string name, object value)
        {

            m_Name = name;

            m_Value = value;

        }



        public CProperty(string name, object value, bool bReadOnly, bool bVisible)
        {

            m_Name = name;

            m_Value = value;

            m_bReadOnly = bReadOnly;

            m_bVisible = bVisible;

        }



        public bool ReadOnly
        {

            get { return m_bReadOnly; }

            set { m_bReadOnly = value; }

        }



        public virtual TypeConverter Converter
        {

            get { return m_Converter; }

            set { m_Converter = value; }

        }



        public string Name
        {

            get { return m_Name; }

            set { m_Name = value; }

        }



        public bool Visible
        {

            get { return m_bVisible; }

            set { m_bVisible = value; }

        }



        public virtual object Value
        {

            get { return m_Value; }

            set { m_Value = value; }

        }



        public string Category
        {

            get { return m_Category; }

            set { m_Category = value; }

        }



        public virtual object Editor
        {

            get { return m_Editor; }

            set { m_Editor = value; }

        }

    }
}
